/*
 * @Author: dfy
 * @Date: 2022-12-09 17:43:32
 * @LastEditors: dfy
 * @LastEditTime: 2022-12-21 15:37:03
 * @FilePath: \FPCC\pages\order-item\order-item.js
 * @Description: 
 * 
 * Copyright (c) 2022 by YongXin, All Rights Reserved. 
 */
Page({
  data: {
    //选项卡选项
    tabs:[
      {
        prompt:'分拣完成后对各项废品进行分类结算',
        id:0,
        value:"未分拣",
        isActive:true,
        content:1,
        height:268
      },
      {
        prompt:'分拣完成后等待后台为您结算',
        id:1,
        value:"待结算",
        isActive:false,
        content:2,
        height:310
      },
      {
        prompt:'结算成功，请返回您的账号查看',
        id:2,
        value:"已结算",
        isActive:false,
        content:3,
        height:322
      }
    ],
    chosen:0,
    showDialog:false
  },
  onLoad() {
  },
  showDialog(){
this.setData({
  showDialog:true
})
  },
  closeDialog(){
    this.setData({
      showDialog:false
    })
  },
  null(){
  },
  /* 切换标题 */
handleTabsItemChange(e){
  //1 获取被点击的标题索引
  const {index} = e.detail;
// console.log(index,"index");
  //2. 修改源数组
  let {tabs} = this.data;
  tabs.forEach((v,i)=>i===index?v.isActive=true:v.isActive=false);
  //3. 赋值到data中
  this.setData({
    tabs,
    chosen:index
  });
},
handleSearch(event){
  console.log(event.detail.value,11111);
},
})
